Skip to content

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Oct 16, 2025

Part of #146411

r? @ghost

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 16, 2025
@rust-log-analyzer

This comment has been minimized.

@cjgillot
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 16, 2025
rust-bors bot added a commit that referenced this pull request Oct 16, 2025
Replace NullOp::SizeOf and NullOp::AlignOf by lang items.
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Oct 17, 2025

☀️ Try build successful (CI)
Build commit: 2cefd8f (2cefd8ff4961f18771f6f840878942cbfbc03afe, parent: 53a741fc4b8cf2d8e7b1b2336ed8edf889db84f4)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2cefd8f): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.5% [0.4%, 0.6%] 3
Regressions ❌
(secondary)
0.7% [0.5%, 0.7%] 4
Improvements ✅
(primary)
-0.2% [-0.2%, -0.1%] 2
Improvements ✅
(secondary)
-0.2% [-0.7%, -0.1%] 14
All ❌✅ (primary) 0.2% [-0.2%, 0.6%] 5

Max RSS (memory usage)

Results (primary -0.3%, secondary -1.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.5% [0.4%, 3.0%] 8
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.4% [-7.6%, -1.1%] 5
Improvements ✅
(secondary)
-1.4% [-2.2%, -0.8%] 3
All ❌✅ (primary) -0.3% [-7.6%, 3.0%] 13

Cycles

Results (primary -2.9%, secondary 6.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
6.8% [6.8%, 6.8%] 1
Improvements ✅
(primary)
-2.9% [-2.9%, -2.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.9% [-2.9%, -2.9%] 1

Binary size

Results (primary -0.0%, secondary -0.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.5%] 22
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 11
Improvements ✅
(primary)
-0.2% [-0.8%, -0.0%] 18
Improvements ✅
(secondary)
-1.2% [-3.2%, -0.3%] 4
All ❌✅ (primary) -0.0% [-0.8%, 0.5%] 40

Bootstrap: 475.105s -> 474.369s (-0.15%)
Artifact size: 390.35 MiB -> 390.39 MiB (0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 17, 2025
@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Oct 17, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@cjgillot cjgillot force-pushed the no-null-op branch 2 times, most recently from fca4c69 to 27154a0 Compare October 17, 2025 17:59
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Oct 18, 2025

☔ The latest upstream changes (presumably #147654) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer

This comment has been minimized.

@cjgillot cjgillot marked this pull request as ready for review October 19, 2025 18:04
@rustbot
Copy link
Collaborator

rustbot commented Oct 19, 2025

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @vakaras

Some changes occurred to constck

cc @fee1-dead

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

The Miri subtree was changed

cc @rust-lang/miri

This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #' to the PR description to autoclose the issue upon merge.

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

This PR changes rustc_public

cc @oli-obk, @celinval, @ouz-a

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 19, 2025
@saethlin
Copy link
Member

The perf regressions are weird. I think they come from this:

let instance = with_no_trimmed_paths!(cid.instance.to_string());
where the interpreter is ??? pre-formatting errors ??

@RalfJung
Copy link
Member

Hm yeah no idea why we are computing that string outside the closure...

@rustbot
Copy link
Collaborator

rustbot commented Oct 19, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@cjgillot
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 19, 2025
Replace NullOp::SizeOf and NullOp::AlignOf by lang items.
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 19, 2025
@rust-bors
Copy link

rust-bors bot commented Oct 20, 2025

☀️ Try build successful (CI)
Build commit: ab65cea (ab65cead52dcf8e64ec14319f1c77892296050e5, parent: f04e3dfc87d7e2b6ad53e7a52253812cd62eba50)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ab65cea): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.3% [0.3%, 0.4%] 2
Regressions ❌
(secondary)
0.3% [0.1%, 0.7%] 13
Improvements ✅
(primary)
-0.5% [-1.0%, -0.2%] 4
Improvements ✅
(secondary)
-0.1% [-0.3%, -0.0%] 5
All ❌✅ (primary) -0.2% [-1.0%, 0.4%] 6

Max RSS (memory usage)

Results (primary -1.3%, secondary -2.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.1% [0.5%, 2.2%] 3
Regressions ❌
(secondary)
3.2% [3.2%, 3.2%] 2
Improvements ✅
(primary)
-2.6% [-4.7%, -1.5%] 6
Improvements ✅
(secondary)
-3.9% [-5.7%, -1.3%] 12
All ❌✅ (primary) -1.3% [-4.7%, 2.2%] 9

Cycles

Results (secondary 1.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.4% [2.6%, 8.1%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.5% [-6.9%, -3.0%] 3
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.0%, secondary -0.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.4%] 20
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 9
Improvements ✅
(primary)
-0.1% [-0.8%, -0.0%] 19
Improvements ✅
(secondary)
-1.2% [-3.1%, -0.3%] 4
All ❌✅ (primary) -0.0% [-0.8%, 0.4%] 39

Bootstrap: 473.871s -> 473.854s (-0.00%)
Artifact size: 388.68 MiB -> 388.39 MiB (-0.08%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 20, 2025
error: InterpErrorInfo<'tcx>,
) -> ErrorHandled {
let (error, backtrace) = error.into_parts();
backtrace.print_backtrace();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one here should stay -- it's part of how RUST_CTFE_BACKTRACE works. By default this is a fairly trivial NOP.

@oli-obk
Copy link
Contributor

oli-obk commented Oct 20, 2025

Instead of having the intrinsics const evaluated and requiring an actual body for the consts, we could also hijack const eval of these lang items directly and thus never have to do the work of actually evaluating their body.

@RalfJung
Copy link
Member

RalfJung commented Oct 20, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants